1. Field of the Invention
The present invention relates to an image measuring apparatus, a program, and a teaching method of the image measuring apparatus.
2. Description of Related Art
Conventionally, an image measuring apparatus is known which captures an image of a work by using a CCD (Charge Coupled Device) camera and the like, detects an edge contained in the image of the work, and, based on the detected edge, measures necessary measurement information (dimension of the work and the like) (for example, see Japanese Patent Laid-Open Publication No. H8-247719). This image measuring apparatus, for example, is used to measure a wiring pattern and the like for which a contact measurement is difficult. When performing a measurement, after a work is set on a measurement table, an image capturer, such as a CCD camera, is moved to a place of the work where a measurement is desired, and a focus adjustment is performed to display an enlarged image of the work on a display. And, with respect to the displayed enlarged image, a so-called edge teaching operation, in which conditions such as a location of an edge to be detected, a detection direction and a detection length are specified, is performed by using a mouse cursor. Thereby, an edge portion of the image is extracted, and desired measurement values are obtained by an arithmetic processing.
In such an edge teaching operation of an image measuring apparatus, when a “light-dark change of a detection direction”, which is one of edge detection parameters, is set, certainty of the edge detection can be increased. Here, the “light-dark change of a detection direction” is a condition indicating whether an image is changing from a light section to a dark section or from a dark section to a light section along the detection direction. However, conventionally, the setting of the “light-dark change of a detection direction” was performed by a user based on a self-judgment. Therefore, there was a problem that workability and efficiency of the teaching operation were poor.